package day10.tarena.com;
import java.util.*;
public class Example1 {
	public static void main(String[] args) {
			Scanner sc=new Scanner(System.in);
			System.out.println("请输入文件的权限：");
			String temp = sc.next();
			if(temp.length() !=9){
					System.out.println("输入格式错误！");
			}else{
				for(int i=0; i<=6; i+=3){
					int pre = 0;
					String str =temp.substring(i, i+3);
					if(str.indexOf("r")==0){
						pre =pre+4;
					}
					if(str.indexOf("w")==1){
						pre = pre+2;
					}
					if(str.indexOf("x")==2){
						pre = pre+1;
					}
					System.out.println(pre);
			}
		}
	}
}
